package com.day0913;

import java.util.Arrays;
import java.util.Scanner;

public class Text9 {
    public static void main(String[] args) {
        int[] nums = {99,85,82,63,60};
        Text8 text = new Text8();
        int[] numArray = text.myCopyOf(nums,2);
        Scanner in = new Scanner(System.in);
        System.out.print("请输入要添加的值:");
        int num = in.nextInt();

        numArray[numArray.length - 1] = num;
        for (int i = numArray.length - 1; i > 0; i --){
            if(numArray[i] > numArray[i - 1]){
                int temp = numArray[i];
                numArray[i] = numArray[i - 1];
                numArray[i - 1] = temp;
            }
        }
        System.out.println(Arrays.toString(numArray));
    }
}
